home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / program / t_bcinfo.zip / TI647.ZIP / TI647.ASC
Text File  |  1992-02-25  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Borland C++                            NUMBER  :  647
  9.   VERSION  :  2.0
  10.        OS  :  PC DOS
  11.      DATE  :  February 25, 1992                        PAGE  :  1/1
  12.  
  13.     TITLE  :  Correct Behavior for ins.getline()
  14.  
  15.  
  16.  
  17.  
  18.   "insp=&ins.get(ptr,sb,delim).  Extracts characters and stores
  19.        them in the byte array beginning at ptr and extending for
  20.        len bytes.  Extraction stops when delim is encountered
  21.        (delim is left in ins and not stored), when ins has no more
  22.        characters, or when the array has only one byte left. get
  23.        always stores a terminating null, even if it doesn't extract
  24.        any characters from ins because of its error status.
  25.        ios::failbit is set only if get encounters an end of file
  26.        before it stores any characters.
  27.  
  28.   insp=&ins.getline(ptr,len,delim). Does the same thing as
  29.        ins.get(ptr,len,delim) with the exception that it extracts a
  30.        terminating delim character from ins. In case delim occurs
  31.        when exactly len characters have been extracted, termination
  32.        is treated as being due to the array being filled, and this
  33.        delim is left in ins."
  34.                           pg. 4, AT&T C++ 2.0 Library Reference
  35.  
  36.   As  stated above, getline() is just like  get()  except  that  it
  37.   reads up to and including the delimiter but does  not  store  the
  38.   delimiter in the buffer.  get() reads up to but not including the
  39.   delim,  so the delim is left unread in  the  stream.    getline()
  40.   reads the delim and throws it away.
  41.  
  42.   TC++ 1.00 has a  problem  in  that  getline() actually stores the
  43.   delimiter in the buffer;  this  behavior  was  a problem, not the
  44.   prescribed behavior for getline()!
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.